1. Field of the Disclosure
The present application relates to video encoders/decoders, methods and computer program product generally, and more particularly to video encoders/decoders, methods and computer program product that use different “Cost” functions for identifying a coding mode for coding a block of pixels.
2. Description of the Related Art
The “background” description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventor, to the extent it is described in this background section, as well as aspects of the description which may not otherwise qualify as prior art at the time of filing, are neither expressly or impliedly admitted as prior art against the present invention.
A video encoder typically divides each frame of original video data in blocks of pixels. In existing standards for video compression (e.g., MPEG1, MPEG2, H.261, H.263, and H.264) these blocks would normally be of sized 16×16 and be referred to as macroblocks (MB). It is anticipated in the yet to be implemented HEVC/H.265 standard, the blocks would typically be larger (e.g. 64×64) and might be rectangular, for instance at frame boundaries.
Typically, the blocks are processed and/or transmitted in raster scan order, i.e. from the top row of blocks to the bottom row of blocks, and from left to right within each row of blocks.
For each block of original pixel data, the encoding is typically performed in the following steps:    1. Produce prediction pixels using reconstructed pixel values from i) the previous frame (inter prediction), or ii) previously reconstructed pixels in the current frame (intra prediction). Depending on the prediction type, the block is classified as an inter block or an intra block.    2. Compute the difference between each original pixel and the corresponding prediction pixel within the block.    3. Apply a two-dimensional transform to the difference samples resulting in a set of transform coefficients.    4. Quantize each transform coefficient to an integer number.    5. Perform lossless entropy coding of the quantized transform coefficient.    6. Apply a two-dimensional inverse transform to the quantized transform coefficient to compute a quantized version of the difference samples.    7. Add the prediction to form the reconstructed pixels for the current block.
Video encoders can further divide blocks of pixels into sub-blocks. Typically, the blocks are of fixed (square) size, while the sub-blocks can be of various e.g. (rectangular) shapes. Also, the partitioning into sub-blocks will typically vary from one block to another.
Inter prediction is typically achieved by deriving a set of motion vectors for each sub-block. The motion vectors define the spatial displacement between the original pixel data and the corresponding reconstructed pixel data in the previous frame. Thus, the amount of data that needs to be transmitted to a decoder can be greatly reduced if a feature in a first frame can be identified to have moved to another location in a subsequent frame. In this situation, a motion vector may by used to efficiently convey the information about the feature that has changed position from one frame to the next.
Intra prediction is typically achieved by deriving an intra direction mode for each sub-block. The intra direction mode defines the spatial displacement between the original pixel data and the previously reconstructed pixel data in the current frame.
Both motion vectors and intra direction modes are encoded and transmitted to the decoder as side information for each sub-block. In order to reduce the number of bits used for this side information, encoding of these parameters depends on the corresponding parameters of previously processed sub-blocks.
Typically, some form of adaptive entropy coding is used. The adaptation makes the entropy encoding/decoding for a sub-block dependent on previously processed sub-blocks. Entropy encoding is lossless encoding that reduces the number of bits that are needed to convey the information to a receiving site.
When selecting between coding modes for a block of pixels, a variety of different options are available. The selection of coding mode is conventionally selected for continuously use during the encoding operation of successive frames.